Goto

Collaborating Authors

 keras layer


TensorFlow from Julia

#artificialintelligence

Last time, I gave a quick introduction to the Julia programming language which has just reached the 1.0 release mark after ten years of development. Julia is touted as the next great thing for scientific computing, machine learning, data science and artificial intelligence. Its hope is to supplant Python which is currently the goto language in these fields. The goal is a more unified language, since it was developed well after Python and learned from a lot of its mistakes. It also claims to have the flexibility of Python but with the speed of a true compiled language like C. I saw that in the list of packages there was support for using Google's TensorFlow AI system natively from Julia so I thought I would give this a try.


Tensorflow 2.0: Keras is not (yet) a simplified interface to Tensorflow

#artificialintelligence

In Tensorflow 2.0 Keras will be the default high-level API for building and training machine learning models, hence complete compatibility between a model defined using the old tf.layers and the new tf.Keras.layers is expected. In version 2 of the popular machine learning framework the eager execution will be enabled by default although the static graph definition session execution will be still supported (but hidden a little bit). In this post, you'll see that the compatibility between a model defined using tf.layers and tf.keras.layers is not always guaranteed when using the graph definition session execution, but it works as expected if the eager execution is enabled (at least from my tests). The post is organized as follows: definition of the common data input pipeline, definition of the same model using both tf.layers and tf.keras.layers, The model we're going to use to highlight the differences between the 2 versions is a simple binary classifier. Instead of using a single tf.data.Dataset object with both the positive and negative classes inside, we want to use the variable sharing feature of Tensorflow (and thus of Keras models) to feed first the positive and then the negative ones in order to test also if the behavior of the variable sharing still works as we're used to.


[P] Keras-surgeon: pruning Keras models in python made easy (pip-installable) • r/MachineLearning

@machinelearnbot

Hi! I've just released keras-surgeon, a network pruning library for Keras implemented in python. A few months ago I wanted to experiment with pruning neural network channels and discovered that there wasn't really a straightforward way to do that. Seeing as I wanted to get some more python experience under my belt, I have implemented a solution. The aim is to facilitate repeating academic studies, applying their findings to real problems or doing new research using Keras. Source code documentation (see readme): https://github.com/BenWhetton/keras-surgeon


Keras as a simplified interface to TensorFlow: tutorial

#artificialintelligence

If TensorFlow is your primary framework, and you are looking for a simple & high-level model definition interface to make your life easier, this tutorial is for you. Keras layers and models are fully compatible with pure-TensorFlow tensors, and as a result, Keras makes a great model definition add-on for TensorFlow, and can even be used alongside other TensorFlow libraries. Note that this tutorial assumes that you have configured Keras to use the TensorFlow backend (instead of Theano). Here are instructions on how to do this. Let's start with a simple example: MNIST digits classification.